package com.example.xd.dialtest.socket;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.util.Log;

/**
 * @auther XuDan on 2020/1/8.
 */
public class JWebSocketClientService extends Service {
    private JWebSocketClientBinder mBinder = new JWebSocketClientBinder();

    class JWebSocketClientBinder extends Binder {
        public JWebSocketClientService getService() {
            return JWebSocketClientService.this;
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("xd---", "onCreate");
    }

    @Override
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startId);
        Log.i("xd---", "onStart");

    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i("xd---", "onStartCommand");
        return super.onStartCommand(intent, flags, startId);

    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.i("xd---", "onBind");

        return mBinder;
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.i("xd---", "onUnbind");

        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.i("xd---", "onDestroy");

    }


    public void add() {
        Log.i("xd---", "add");
    }
}
